package com.ukee.birthday.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * WebMvc配置
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
//        public static final String FILEPATH = "E:/upload/";
      public static final String FILEPATH = "/home/resouce/";
//    public static final  String FILEPATH = "/www/wwwroot/back_vue/fileupload/";
//    public static final String FILEPATH = "/usr/local/ts/vuecode/fileupload/";
//    public static final String FILEPATH = "/usr/java/file/upload/";

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/upload/**").addResourceLocations("file:" + FILEPATH);
    }

}
